package cn.hiapi.shopkeeper.entity.activity;

import cn.hiapi.basic.entity.BasicEntity;
import cn.hiapi.basic.serializer.LongToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * @author AdinZ
 * @date 2022/12/13 0:59
 */
@Entity
@Table(name = "hiapi_shopkeeper_activity_other")
@ApiModel(description = "活动其他设置")
@Getter
@Setter
public class ActivityOther extends BasicEntity {
    @Id
    @GeneratedValue(generator = "snowflake")
    @GenericGenerator(name = "snowflake", strategy = "cn.hiapi.basic.id.SnowflakeId")
    @JSONField(serializeUsing = LongToStringSerializer.class)
    private Long id;

    @ApiModelProperty("活动id")
    private long aid;
    @ApiModelProperty("店铺id")
    private long shopId;

    @ApiModelProperty("活动通知推送 0关闭,1开启")
    private int notify;

    @ApiModelProperty("分享有奖 1 开启")
    private int share;

    @ApiModelProperty("分享奖励标题")
    private String shareTitle;

    @ApiModelProperty("分享总数量")
    private int shareTotal;
    @ApiModelProperty("每拉一人下单奖励金额")
    @Column(columnDefinition = "decimal(10,2)")
    private BigDecimal shareAmount = BigDecimal.ZERO;

    @ApiModelProperty("下单赠送喜糖")
    @Column(columnDefinition = "decimal(10,2)")
    private BigDecimal giftSugar = BigDecimal.ZERO;


    @ApiModelProperty("喜糖支付")
    private int sugar;

    @ApiModelProperty("分享后得到的抽奖次数 ")
    private int shareLottery;

    @ApiModelProperty("每人每天拉新抽奖次数")
    private int dayShare;


    @ApiModelProperty("喜糖抵扣")
    private BigDecimal sugarPay;


}
